package cn.dust.design.pattern.behavioral.observer.zhandui;

public class Dust extends Zhandui{

    public Dust(String name){
        System.out.println(name+"战队组建成功");
        System.out.println("--------------");
        this.allname=name;
    }

    @Override
    public void tongzhi() {
        System.out.println(this.allname+"通");
        for(Object obj: observers){
            if(!((Observer)obj).getName().equalsIgnoreCase(allname)){
                ((Observer) obj).help();
            }

        }
    }
}
